/*
 *  Description: BOAT XU SOFT FHSS
 *  Version: V1.00
 *  Author: boat xu
 *  Email: xifengzui@outlook.com
 *  Date: 2020-07-14 16:58:02
 *  LastEditTime: 2020-07-16 16:57:19
 */ 
#ifndef __BSF_MISC_H__
#define __BSF_MISC_H__

#include "bsf_types.h"
#include "bsf_itypes.h"
#include "bsf_payload.h"
#include "bsf_freqHopping.h"
#include "bsf_rand.h"
#if defined(WIN32) || defined(WIN64)
#pragma pack(1)
#endif
#ifdef __cplusplus
extern "C"{
#endif
typedef struct {
    b_u8_t indexH;
    b_u8_t indexL;
    b_u8_t userData[BSF_PAYLOADSIZE - 2];
}bsf_MiscComUserData;
typedef struct 
{
    b_u8_t seedL;
    b_u8_t seedH;
    b_u8_t table[BSF_RAND_FREQCUTNUM];
}bsf_MiscComSeedTable;

void bsf_miscComFillSync(bsf_payload *inBuf);

void bsf_miscComFillSeedTable(bsf_payload *inBuf, b_u16_t seed, b_u8_t *table);

void bsf_miscComFillUserData(bsf_payload *inBuf, b_u16_t index, b_u8_t *userData, b_u8_t userDataLen);

#ifdef __cplusplus
}
#endif
#if defined(WIN32) || defined(WIN64)
#pragma pack()
#endif
#endif